Skip to content

[material-nextjs] Back port CSS layers for pages router #46283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: v6.x
Choose a base branch
from

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Jun 6, 2025

Wait for #46001 to be merged first and will do the cherry pick to this PR once more.

- Add enableCssLayer option to createEmotionCache for pages router
- Export createEmotionCache from v13-pagesRouter module
- Update SSR emotion styles to handle CSS layer order rules properly
- Prevent CSS layer order flickering during hydration

Backport of mui#45596 to v6.x branch
- Document how to enable CSS layers with createEmotionCache
- Update CSS theme variables heading level to h3
- Add examples for both _document.tsx and _app.tsx setup

Part of backport of mui#45596 to v6.x branch
@mui-bot
Copy link

mui-bot commented Jun 6, 2025

Netlify deploy preview

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against c4230a3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants